// vite.config.ts
import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import VueSetupExtend from "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import path from "path";
import { viteMockServe } from "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/node_modules/vite-plugin-mock/dist/index.js";
var __vite_injected_original_import_meta_url = "file:///D:/Documents/Desktop/data/%E8%B5%84%E6%96%99/%E9%A1%B9%E7%9B%AE/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/project/vite.config.ts";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      VueSetupExtend(),
      createSvgIconsPlugin({
        // 指定需要缓存的图标文件夹
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // 指定symbolId格式
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        // 保证开发阶段可以使用mock接口
        localEnabled: command === "serve"
      })
    ],
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
      }
    },
    // sass全局变量配置项
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    // 代理跨域
    server: {
      proxy: {
        [env.VITE_APP_BASE_API]: {
          // 获取数据的服务器地址
          target: env.VITE_SERVE,
          // 是否代理跨域
          changeOrigin: true,
          // 路径重写
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxEb2N1bWVudHNcXFxcRGVza3RvcFxcXFxkYXRhXFxcXFx1OEQ0NFx1NjU5OVxcXFxcdTk4NzlcdTc2RUVcXFxcXHU3ODQ1XHU4QzM3XHU3NTA0XHU5MDA5XFxcXHByb2plY3RcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkQ6XFxcXERvY3VtZW50c1xcXFxEZXNrdG9wXFxcXGRhdGFcXFxcXHU4RDQ0XHU2NTk5XFxcXFx1OTg3OVx1NzZFRVxcXFxcdTc4NDVcdThDMzdcdTc1MDRcdTkwMDlcXFxccHJvamVjdFxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRDovRG9jdW1lbnRzL0Rlc2t0b3AvZGF0YS8lRTglQjUlODQlRTYlOTYlOTkvJUU5JUExJUI5JUU3JTlCJUFFLyVFNyVBMSU4NSVFOCVCMCVCNyVFNyU5NCU4NCVFOSU4MCU4OS9wcm9qZWN0L3ZpdGUuY29uZmlnLnRzXCI7aW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